<%@page import="me.chanjar.weixin.common.bean.WxJsapiSignature"%>
<%@page import="me.chanjar.weixin.cp.api.WxCpService"%>
<%@page import="itsm.isperp.framework.core.context.ContextHolder"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<%
	String path = request.getContextPath();
	String basePath = ContextHolder.getWebServerName(request);
	WxCpService wxCpService = ContextHolder
			.getSpringBean("wxCpService");
	WxJsapiSignature signature = null;
	 

	String appId=ContextHolder.getWxCpConfig().getCorpId();
	try {
		signature = wxCpService.createJsapiSignature(basePath);

	} catch (Exception e) {
		// 错误
		signature = new WxJsapiSignature();
	}
%>
<!doctype html>

<html>
<head>
<title><%=ContextHolder.getConfigByKey("companyIntro")%></title>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="format-detection" content="telephone=no">
<meta http-equiv="x-rim-auto-match" content="none">
<link rel="stylesheet" type="text/css"
	href="<%=path%>/css/mobile/mobile.css" />
<link rel="stylesheet" type="text/css"
	href="<%=path%>/css/mobile/weui.min.css" />

<script type="text/javascript" src="<%=path%>/js/jquery.js"></script>
<script type="text/javascript" src="<%=path%>/js/widget/dateSelector.js"></script>
<script type="text/javascript" src="<%=path%>/js/libs/forms/jquery.validate.js"></script>
<script type="text/javascript" src="<%=path%>/js/libs/jweixin-1.1.0.js"></script> 
<script type="text/javascript">
 
	wx.config({
	    debug: false, 
	    appId: '<%=appId%>', 
	    timestamp:<%=signature.getTimestamp()%>, 
	    nonceStr: '<%=signature.getNoncestr()%>',
	    signature: '<%=signature.getSignature()%>',
		jsApiList : [ 'hideOptionMenu' ]
	});
	wx.ready(function(){
		wx.hideOptionMenu(); //隐藏右上角菜单接口
	});
	wx.hideOptionMenu();
	$.weui = {};
	$.weui.alert = function(options) {
		options = $.extend({
			title : '温馨提醒',
			text : '您当前操作无效！'
		}, options);
		var $alert = $('#weui_dialog_alert');
		$alert.find('.weui-dialog__title').text(options.title);
		$alert.find('.weui-dialog__bd').text(options.text);

		$alert.show().on('click', '.weui-dialog__btn', function() {
			$alert.off('click').hide();
		});

	};

	$.weui.loadingToast = function(obj) {
		$("#loadingToast").show();
		$(obj).hide();
		return true;
	}
</script>
</head>
<body style="overflow:auto;">
	<div class="container" id="container">
		<sitemesh:write property='body' />
	</div>
	<div id="loadingToast" style="display: none;">
		<div class="weui-mask_transparent"></div>
		<div class="weui-toast">
			<i class="weui-loading weui-icon_toast"></i>
			<p class="weui-toast__content">数据加载中</p>
		</div>
	</div>
	<div id="weui_dialog_alert" style="display: none">
		<div class="weui-mask"></div>
		<div id="weui_dialog_alert" class="weui-dialog">

			<div class="weui-dialog__hd">
				<strong class="weui-dialog__title">温馨提醒</strong>
			</div>
			<div class="weui-dialog__bd">您当前操作无效！</div>
			<div class="weui-dialog__ft">
				<a href="javascript:;"
					class="weui-dialog__btn weui-dialog__btn_primary">确定</a>
			</div>
		</div>
	</div>
</body>
</html>